'use strict';

var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault');
Object.defineProperty(exports, '__esModule', {
  value: true,
});
exports.default = void 0;
var _react = _interopRequireDefault(require('react'));
var TextForOptionsValue = function TextForOptionsValue(_ref) {
  var value = _ref.value,
    fieldNames = _ref.fieldNames;
  var _ref2 = fieldNames || {},
    _ref2$value = _ref2.value,
    labelKey = _ref2$value === void 0 ? 'label' : _ref2$value;
  // @ts-ignore
  var texts =
    value === null || value === void 0
      ? void 0
      : value.map(function (val) {
          return val[labelKey];
        });
  return /*#__PURE__*/ _react.default.createElement(
    'span',
    {
      className: 'szzj-form-detail-options',
    },
    texts === null || texts === void 0 ? void 0 : texts.join(','),
  );
};
var _default = TextForOptionsValue;
exports.default = _default;
